from pyspades.common import coordinates
from commands import add, admin, name

@name('tpmc')
def tpmc(connection, *arg):
    player = connection
    x, y = coordinates(*arg)
    #if value.starts:
    player.set_location((x, y, connection.protocol.map.get_height(x, y) - 2))

add(tpmc)

def apply_script(protocol, connection, config):
    class TpmcConnection(connection):
        def print1():
            print "Applied Script: Tpmc"
    
    class TpmcProtocol(protocol):
        def print2():
            print "Applied Script: Tpmc"
    
    return TpmcProtocol, TpmcConnection